<!DOCTYPE html PUBLIC"-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script src="jquery.min.js" type="text/javascript"></script>
</head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>insert page</title></head>
<body>

<script>

$(document).ready(function () {
	callGET();
	callPOST();
});

function callGET()
{
$.ajax({
	url: 'get.php',
	type: 'GET',
	data: 'ip=1&ip2=2',
	success: function(data) {
		console.debug(data);
	},
	error: function(e) {
		console.debug("error");
	}
	});	
}

function callPOST()
{
	var data = {
		"action": "test",
		"name": "dhiraj"
	}; 

	$.ajax({
	type: "POST",
	dataType: "json",
	url: "post.php", 
	data: data,
	success: function(data) {
		console.debug(data);
	},
	error: function(e) {
		console.debug("error");
	}
	}); 
}

</script>

</body>
</html>